//
//  NBSpeedDashboardView.h
//  automobiledashboard
//
//  Created by 王建华 on 2025/9/26.
//

#import <UIKit/UIKit.h>
#import "NBLayerUtils.h"

NS_ASSUME_NONNULL_BEGIN

@interface NBSpeedDashboardView : UIView

@property (nonatomic, assign) CGFloat speed; // 速度值 km/h
@property (nonatomic, assign) CGFloat maxSpeed; // 最大速度值

/// 更新速度
/// - Parameters:
///   - speed: 速度 km/h
///   - animated: 是否使用动画
- (void)setSpeed:(CGFloat)speed
        animated:(BOOL)animated;

/// 更新速度
/// - Parameters:
///   - speed: 速度 km/h
///   - animated: 是否使用动画
///   - completion: 动画结束
- (void)setSpeed:(CGFloat)speed
        animated:(BOOL)animated
      completion:(void (^ __nullable)(BOOL finished))completion;

/// 播放启动动画
- (void)playStartupAnimation;

/// 播放启动动画
/// - Parameter completion: 动画结束
- (void)playStartupAnimationWithCompletion:(void (^ __nullable)(BOOL finished))completion;

@end

NS_ASSUME_NONNULL_END
